<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="description" content="name here">
	<meta name="author" content="name here">

	<title>Title here</title>

	<link rel="stylesheet" href="css/jquery.mobile.structure-1.3.0.css">
	<link rel="stylesheet" href="themes/BancoDelPeru.css">

	<script src="js/jquery-1.9.1.js"></script>
	<script src="js/jquery.mobile-1.3.0.js"></script>
	<script type="text/javascript" src="js/cordova-2.5.0.js" charset="utf-8"></script>
	<script src="js/configs.js"></script>

<script type="text/javascript" charset="utf-8">
	function iniciar() {
		document.addEventListener("deviceready", dispositivoListo, false);
	}
	function dispositivoListo() {

	}
	
	function StatementShow()
	{
		var cust= window.localStorage["customerID"];
		var chkAccount= window.localStorage["chkAccount"];
		var chkTransaction= window.localStorage["chkTransaction"];
		
		console.log(chkAccount);
		console.log(chkTransaction);
		
		
		$.ajaxSetup({ cache: false });
		 
		$.getJSON("http://"+SERVER_IP_ADDRESS+":8080/WebBancoPeru/rest/statement/full", {CustomerID: cust, chkAccount: chkAccount, chkTransaction: chkTransaction}, function(data){	
    		
	        //alert(data.length);
			for (var i = 0; i < data.length; i++) {
			    var object = data[i];
			    
			    
			    //alert(object.transactionString);
			    var typeString1 = "Checking";
			    var typeString2 = "Savings";
			    if(object.type == 1)
			    	{
			    	object.type = typeString1;
			    	
			    	}
			    else
				{
			    	object.type = typeString2;
			    	
				}
			    
			   
			 $('#statementList').append('<li>'+object.transactionString+' ' + object.type + ' ' + object.amount + '</li>')
			}
			
	        	
    	});
		
	}
	
	
</script>

</head>

<body onLoad="StatementShow()">


<div data-role="page" id="Statement" data-theme="a">
	<div data-role="header">
		<h6>STATEMENTS</h6>
		
		
	</div>





<ul id="statementList">
		
		</ul>



	<center>
		<a href="menuStatement.html" data-role="button" data-inline="true"
			data-mini="false" data-shadow="false"> Go back to menu </a>
	</center>





</div>
<div data-role="footer"></div>
</body>

</html>





<!-- 		<ul data-role="listview"  -->
<!-- 		    data-inset="true"  -->
<!-- 			data-filter="false"  -->
<!-- 			data-filter-placeholder="Type here"  -->
<!-- 			> -->

<!-- 		<li data-role="list-divider">ACCOUNT</li> -->

<!-- 			<li><a href="test_navegacion.html"> Checking </a></li> -->
<!-- 			<li><a href="test_navegacion.html"> Saving </a></li> -->

<!-- 		</b> -->
<!-- 		</b> -->
<!-- 		<li data-role="list-divider">TRANSACTION</li> -->
<!-- 			<li><a href="test_tablas.html"> Full Statement </a></li> -->
<!-- 			<li><a href="test_navegacion.html"> Deposit  </a></li> -->
<!-- 			<li><a href="test_navegacion.html"> Withdrawal </a></li> -->
<!-- 			<li><a href="test_navegacion.html"> Transfer </a></li> -->

<!-- 		</ul> -->